import Vue from "vue";
import App from "./App.vue";
import router from "./router/router.js";
import store from "@/store";
import ElementUI from "element-ui";
import "@/assets/theme.css";

Vue.use(ElementUI);

// 注册全局组件
import Nav from "./components/Nav.vue";
import Header from "./components/Header";
Vue.component("Nav", Nav);
Vue.component("Header", Header);

import BaiduMap from "vue-baidu-map";
Vue.use(BaiduMap, {
  ak: "FfHeS1sH23aiRXFN0QfFIGEMGTw4lCEs",
});

Vue.config.productionTip = false;

import { Quill } from "vue-quill-editor";
window.Quill = Quill;

const scriptEl = document.createElement("script");
scriptEl.charset = "utf-8";
scriptEl.src = "./image-resize.min.js";
const head = document.head || document.getElementsByTagName("head")[0];
head.appendChild(scriptEl);

new Vue({
  render: (h) => h(App),
  router,
  store,
}).$mount("#app");
